package com.chucang.shucang.common.base.exception;


/**
 * @author flitsneak
 * @email flitsneak@gmail.com
 * @date 2022/9/11 15:13
 * @description 自定义快速抛出异常
 */
public class FastException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private int code = 500;
    private String msg;

    public FastException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public FastException(int code, Throwable e, String msg) {
        super(e);
        this.code = code;
        this.msg = msg;
    }

    public FastException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public FastException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

}